Skip to content

Prefer the syncing version's own release as scan base - #134

Merged
RomainCscn merged 1 commit into
mainfrom
romain/version-match-scan-base
Aug 27, 2026
Merged

Prefer the syncing version's own release as scan base#134
RomainCscn merged 1 commit into
mainfrom
romain/version-match-scan-base

Conversation

@RomainCscn

@RomainCscn RomainCscn commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

The CLI picks its scan base by walking recent releases and taking the first one whose commit SHA exists in the repo's history. When more than one release is open on the same branch, that first match is not always the release being synced — for example a patch release that just completed can rank ahead of a long-running 2.0.0 train.

Before — syncing 2.0.0 (last synced at abc1234) while 1.4.2 ships from the same branch:

linear-release sync --release-version 2.0.0
# base = 1.4.2's commit → wrong scan range: issues land on the
# wrong release, or get scanned twice

After — a sync that names a version resumes that version's own release:

linear-release sync --release-version 2.0.0
# base = abc1234, 2.0.0's own last-synced commit

If no candidate matches the version — first sync of a new release, or its SHA is not in this repo's history — the existing walk runs unchanged. Cross-branch behavior (scenarios A–F) is untouched.

@linear linear deleted a comment from linear-code Bot Aug 27, 2026
@RomainCscn
RomainCscn merged commit c9d6459 into main Aug 27, 2026
11 checks passed
@RomainCscn
RomainCscn deleted the romain/version-match-scan-base branch August 27, 2026 09:42
@RomainCscn RomainCscn mentioned this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants